package Test;

public class MyDate {
    int year,month,day;

    public MyDate(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof MyDate){
            MyDate myDate = (MyDate) obj;
            if(myDate.day==this.day && myDate.month==this.month && myDate.year==this.year)
                return true;
        }
        return false;
    }
}
